<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>iicps: xiicps_polled_master_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.gif"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">iicps
   </div>
   <div id="projectbrief">Xilinx SDK Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xiicps__polled__master__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">xiicps_polled_master_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>A design example of using the device in polled mode as master. </p>
<p>The example uses buffer size 132. Please set the send buffer of the Aardvark device to be continuous 64 bytes from 0x00 to 0x3F.</p>
<pre> MODIFICATION HISTORY:</pre><pre> Ver   Who Date     Changes
<hr/>

 1.00a jz  01/30/10 First release</pre><pre> </pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ac4e558f8d80a9e19319e0e663093ebe9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xiicps__polled__master__example_8c.html#ac4e558f8d80a9e19319e0e663093ebe9">IicPsMasterPolledExample</a> (u16 DeviceId)</td></tr>
<tr class="memdesc:ac4e558f8d80a9e19319e0e663093ebe9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends data and expects to receive data from slave as modular of 64.  <a href="#ac4e558f8d80a9e19319e0e663093ebe9">More...</a><br /></td></tr>
<tr class="separator:ac4e558f8d80a9e19319e0e663093ebe9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xiicps__polled__master__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function to call the polled master example.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br /></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ac16e1350ea077cddfa26851a6e7ead7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_x_iic_ps.html">XIicPs</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xiicps__polled__master__example_8c.html#ac16e1350ea077cddfa26851a6e7ead7c">Iic</a></td></tr>
<tr class="memdesc:ac16e1350ea077cddfa26851a6e7ead7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Instance of the IIC Device.  <a href="#ac16e1350ea077cddfa26851a6e7ead7c">More...</a><br /></td></tr>
<tr class="separator:ac16e1350ea077cddfa26851a6e7ead7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21a34b7f8d09398f53237562bd1f579b"><td class="memItemLeft" align="right" valign="top">u8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xiicps__polled__master__example_8c.html#a21a34b7f8d09398f53237562bd1f579b">SendBuffer</a> [TEST_BUFFER_SIZE]</td></tr>
<tr class="memdesc:a21a34b7f8d09398f53237562bd1f579b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Buffer for Transmitting Data.  <a href="#a21a34b7f8d09398f53237562bd1f579b">More...</a><br /></td></tr>
<tr class="separator:a21a34b7f8d09398f53237562bd1f579b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97ff43d2dc0c58afc33efc1304f40b09"><td class="memItemLeft" align="right" valign="top">u8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xiicps__polled__master__example_8c.html#a97ff43d2dc0c58afc33efc1304f40b09">RecvBuffer</a> [TEST_BUFFER_SIZE]</td></tr>
<tr class="memdesc:a97ff43d2dc0c58afc33efc1304f40b09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Buffer for Receiving Data.  <a href="#a97ff43d2dc0c58afc33efc1304f40b09">More...</a><br /></td></tr>
<tr class="separator:a97ff43d2dc0c58afc33efc1304f40b09"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ac4e558f8d80a9e19319e0e663093ebe9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4e558f8d80a9e19319e0e663093ebe9">&#9670;&nbsp;</a></span>IicPsMasterPolledExample()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int IicPsMasterPolledExample </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DeviceId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends data and expects to receive data from slave as modular of 64. </p>
<p>This function uses interrupt-driven mode of the device.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">DeviceId</td><td>is the Device ID of the IicPs Device and is the XPAR_&lt;IICPS_instance&gt;_DEVICE_ID value from xparameters.h</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, otherwise XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">References <a class="el" href="group__iicps__v3__0.html#ga6809c43387826c1f50e719163d4d9d27">XIicPs_Config::BaseAddress</a>, <a class="el" href="group__iicps__v3__0.html#gae97ad9c202953c7e49bfb56533c47079">XIicPs_CfgInitialize()</a>, <a class="el" href="group__iicps__v3__0.html#ga14c7ff4f51185d8aab0028c0eeb3c336">XIicPs_LookupConfig()</a>, <a class="el" href="group__iicps__v3__0.html#ga6f9db7651cd6ee0232dc9fdaca3f976a">XIicPs_SelfTest()</a>, and <a class="el" href="group__iicps__v3__0.html#gafb24cfdacf6cf28d80126862dc1cfbe5">XIicPs_SetSClk()</a>.</p>

<p class="reference">Referenced by <a class="el" href="xiicps__polled__master__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<a id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a840291bc02cba5474a4cb46a9b9566fe">&#9670;&nbsp;</a></span>main()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main function to call the polled master example. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, XST_FAILURE if unsuccessful.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">References <a class="el" href="xiicps__polled__master__example_8c.html#ac4e558f8d80a9e19319e0e663093ebe9">IicPsMasterPolledExample()</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="ac16e1350ea077cddfa26851a6e7ead7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac16e1350ea077cddfa26851a6e7ead7c">&#9670;&nbsp;</a></span>Iic</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_x_iic_ps.html">XIicPs</a> Iic</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Instance of the IIC Device. </p>

</div>
</div>
<a id="a97ff43d2dc0c58afc33efc1304f40b09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97ff43d2dc0c58afc33efc1304f40b09">&#9670;&nbsp;</a></span>RecvBuffer</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u8 RecvBuffer[TEST_BUFFER_SIZE]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Buffer for Receiving Data. </p>

</div>
</div>
<a id="a21a34b7f8d09398f53237562bd1f579b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21a34b7f8d09398f53237562bd1f579b">&#9670;&nbsp;</a></span>SendBuffer</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u8 SendBuffer[TEST_BUFFER_SIZE]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Buffer for Transmitting Data. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Copyright &copy; 2015 Xilinx Inc. All rights reserved.</li>
  </ul>
</div>
</body>
</html>
